{% extends 'server_ui/templates/base.html' %}
{% block title %}Confirm Vote{% endblock %}

{% block content %}
<script language="javascript">
$(document).ready(function() {
  $('#waiting_div').hide();
});

function show_waiting() {
  $('#cast_div').hide();
  $('#waiting_div').show();
}
</script>
<h1>确认投票</h1>

{% if error %}
<p style="color: red;">{{error}}</p>
{% endif %}

<h3>您的选票</h3>

<p style="font-size:1.6em;">
    <tt>{{vote_fingerprint}}</tt>
</p>

<div id="cast_div">
<h3>使用您的凭证投票</h3>

<form method="post" onsubmit="show_waiting();" action="">
    <input type="hidden" name="csrf_token" value="{{csrf_token}}" />

<table>
{{form.as_table}}
</table><br />

    <input type="submit" value="cast this ballot" /><br /><br />
</form>

<p>
    忘记密码? <a href="{% url "auth@password@forgotten" %}?return_url={% url "election@cast-confirm" %}">Have it emailed to you</a>.<br />(别担心，我们不会忘记您的投票).
</p>
</div>

<div id="waiting_div" align="center">
  验证并投出选票<br />
  <img src="/static/helios/loading.gif" />
</div>

{% endblock %}
